Search
Other DB Replacer questions
Forum

Update {article 123 with RegEx: nothing happens

Peter Bödeker's Avatar Peter Bödeker
Hello,
I am trying to get the "id=" in front of my article IDs as per the instructions on docs3.regularlabs.com/articlesanywhere/g...m-joomla3-to-joomla4 . I also click on "regular expressions".

Suche: (\{article(?:-[a-z0-9-_]+)?) ([0-9]+)\}
Replace: \1 id="\2"}

But nothing happens after clicking on "Search".

I tried it in Chrome and Firefox.

Search/replace without regular expressions works.

What might be the problem for me?
Peter Bödeker's Avatar Peter Bödeker
Maybe it is important, that we have 4.000 articles online.
Peter Bödeker's Avatar Peter Bödeker
I just see that there are some more problems:
- Cache Cleaner button is not displayed
- Better-Preview also not
After migrating from Joomla 3 to Joomla 4 it also shows me error messages after a library of Regularlabs should be missing. After I reinstalled all extensions, the error message was gone. But apparently something is still missing, because the Regular-Labs-Extensions do not work properly ...

I have created a SuperUser account, if you like to have a look ...

Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
Better Preview is not available for Joomla 4. There is Better Frontend Link though:
regularlabs.com/betterfrontendlink

Did you reinstall all extensions after your upgrade to Joomla 4?
What exactly is now not working?
Please post a rating at the Joomla! Extensions Directory
Peter Bödeker's Avatar Peter Bödeker
Yes. I reinstalled some things, cleane caches etc. and now the "Cache Cleaner - Button" and the Frontendlink work.

But still the regular-Expressions in the DB-Replacer not.
Other things, pure words for example, are replaced without problems.
Peter van Westen's Avatar Peter van Westen ADMIN
I just tried your exact search and replacement on my setup, and it works fine:


You only gave me the admin credentials, but not the URL of your website 🙂
Can you also give me (s)ftp access so I can take a deeper look?
Please post a rating at the Joomla! Extensions Directory
Peter Bödeker's Avatar Peter Bödeker
Interesting: In the article www.blueprints.de/selbsterkenntnis/tageb...schreiben-tipps.html
the old code {articles 2733} ... still works (Include "Glückstagebuch").
Peter Bödeker's Avatar Peter Bödeker
Sorry ...
Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
Yes, I would need ftp access to see what is going on under the hood.
Please post a rating at the Joomla! Extensions Directory
Peter Bödeker's Avatar Peter Bödeker
This should work:
Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
That just gives me access to an empty FTP folder.
Please post a rating at the Joomla! Extensions Directory
Peter Bödeker's Avatar Peter Bödeker
Sorry, here the correct access (now tested):
Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
It looks like your version of MySQL has issues with certain Regular Expressions formats.
And it keeps running into a "'repetition-operator operand invalid' from regexp" error.

In your case I recommend you do this in 2 replacements.
First:
\{article ([0-9]+)\}
Replace with:
{article id="\1"}

And then:
\{article-([a-z0-9\-_]+) ([0-9]+)\}
Replace with:
{article-\1 id="\2"}

(The second one doesn't seem to be present in your content. So just the first one will be enough.)
Please post a rating at the Joomla! Extensions Directory
Peter Bödeker's Avatar Peter Bödeker
Thank you, that works!

Do you have a solution for multiple items, too? For example: {articles 4044,2691,2641,3909}
(still working, see www.blueprints.de/beziehungen/erwartungen-partnerschaft.html )
Peter van Westen's Avatar Peter van Westen ADMIN
Pretty much same idea.
\{articles ([0-9,]+)\}
Replace with:
{articles id="\1"}
Please post a rating at the Joomla! Extensions Directory
Peter Bödeker's Avatar Peter Bödeker
That doesn´t work. The replacer finds no itmes.

PS: On docs3.regularlabs.com/articlesanywhere/p...tags/output-settings I see "publish_up, publish_down" in the chapter "Ordering". On some other site, too. That should be replaced with publish-up etc., or not?
Peter van Westen's Avatar Peter van Westen ADMIN
I just tried that exact thing on your site:
The search string is found in 460 row(s).
Remember to switch on the Regular Expressions option.

By the looks of it, you are not using any ordering attributes with values containing underscores anywhere.
Please post a rating at the Joomla! Extensions Directory
Peter Bödeker's Avatar Peter Bödeker
Another fault by me 🙁 - I forgot to swith on. No all articles-integrations are correct.

I go further. The underscore in offset_headings="... is still ok, right?
Peter van Westen's Avatar Peter van Westen ADMIN
The underscore stuff will still work. But might not do in some future release.
So it is up to you wether you want to replace all those.
Please post a rating at the Joomla! Extensions Directory
Peter Bödeker's Avatar Peter Bödeker
Thank you. With your help I was able to update everything. I was also able to update all {module 123} with {module id="123"} right away. .

You know that in the articles_anywhere documentation there are still a lot of underscores with the instructions? E.g. at docs3.regularlabs.com/articlesanywhere/p...s/filters#categories

Many greetings
Peter
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription